﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class FrontPages_Reviews : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            if (Request.UrlReferrer != null)
            {
                Reviews.HostName = HostName;
            }
            string ID = Request.Url.Query.Replace("?ID=", ""); //详细页下一条下一条进来
            if (string.IsNullOrEmpty(ID))
            {
                ID = Request.UrlReferrer.Query.Replace("?ID=", ""); //列表页点进来
            }
            string[] arr = ID.Split('&');
            if (arr != null && arr.Length > 0)
            {
                //NewsDetail.HostName = "www.ilenor.cc";
                Reviews.Area = arr[0];
            }

            
            
        }
    }

    public string HostName
    {
        get
        {
            if (StringHelper.FormatObjToString(ViewState["HostName"]) != string.Empty)
            {
                return StringHelper.FormatObjToString(ViewState["HostName"]);
            }
            else if (Request.UrlReferrer != null)
            { ViewState["HostName"] = Request.UrlReferrer.Host; return Request.UrlReferrer.Host; }
            return string.Empty;

        }
    }



}